package com.power.flowable.api;


import com.plf.common.domain.ResponseDTO;
import com.power.flowable.model.Act_dsn_form_stepbtn;
import com.power.flowable.model.pageinfo.Act_dsn_form_stepbtnPageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 *  流程环节按钮配置 Feign
 */

@FeignClient(value = "sfflow-svr", contextId = "sfflow-svr", path = "/sfflow-svr")
@RestController
public interface IAct_dsn_form_stepbtnFeign {

    /**
     * 流程环节按钮配置分页列表
     */
    @PostMapping("/act_dsn_form_stepbtn/list")
    ResponseDTO list(@RequestBody Act_dsn_form_stepbtnPageInfo act_dsn_form_stepbtnPageInfo);

    /**
     * 查看流程环节按钮配置
     */
    @GetMapping("/act_dsn_form_stepbtn/view")
    ResponseDTO view(@RequestParam("id") Integer id);

    ///**
    // * 查看流程环节按钮配置 复合主键使用
    // */
    //@PostMapping("/act_dsn_form_stepbtn/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Act_dsn_form_stepbtn.Act_dsn_form_stepbtnPK pk);

    /**
     * 修改或保存流程环节按钮配置
     */
    @PostMapping("/act_dsn_form_stepbtn/save")
    ResponseDTO save(@RequestBody Act_dsn_form_stepbtn  act_dsn_form_stepbtn);

    /**
     * 删除流程环节按钮配置
     */
    @PostMapping("/act_dsn_form_stepbtn/delete")
    ResponseDTO delete(@RequestParam("id") Integer id);

    ///**
    // * 删除流程环节按钮配置 复合主键使用
    // */
    //@PostMapping("/act_dsn_form_stepbtn/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Act_dsn_form_stepbtn.Act_dsn_form_stepbtnPK pk);

    /**
     * 批量删除流程环节按钮配置
     */
    @PostMapping("/act_dsn_form_stepbtn/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

     /**
     * 导出excel
     */
    @PostMapping("/act_dsn_form_stepbtn/output")
    void output(@RequestParam HttpServletResponse response, @RequestBody Act_dsn_form_stepbtnPageInfo act_dsn_form_stepbtnPageInfo);

     /**
     * 导出excel模板
     */
    @PostMapping("/act_dsn_form_stepbtn/exportExcelTemplate")
    void exportExcelTemplate(@RequestParam HttpServletResponse response);

     /**
     *	导入excel
     */
    @PostMapping("/act_dsn_form_stepbtn/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;


    /**
     * 批量保存流程环节按钮配置
     */
    @PostMapping("/act_dsn_form_stepbtn/batchSave")
    ResponseDTO batchSave(@RequestParam String formid, @RequestParam String stepid, @RequestBody List<Act_dsn_form_stepbtn> list);

}
